﻿#from datetime import datetime
#from random import randrange
#for t in $tweets
<li id="$t['_id']" class="tweetItem" onmouseover="" onmouseout="">
	<div class="fleft">
    	<a href="/userline/$t.user.uid">
    	#set image = '/static/images/example50-%d.jpg'%randrange(10)
    	<img src="$image" border="0" class="userPic50" onmouseover="" onmouseout=""/></a>
	</div>
   	<div class="fright">
   	
    	<div class="tMsgBox01">
        	<span class="gray01"><a href="#" name="un">$t.user.name</a>&nbsp;:</span>&nbsp;<span>$t.text</span>

			#if $t.has_key('tags') and $len($t.tags)
                <div class="tTagListBox">
					<ul class="ulTagList" id="include_tag_ul_$t['_id']">
					#for tag in $t.tags
						#set tagid = '%s-%s'%($t._id,$tag)
						<li id="$tagid" onmouseover="tagItemOnMouseOver(this)" onmouseout="tagItemsOnMouseOut(this)">
							<a href="/tagline/$tag"  class="ui-corner-all">$tag</a>
							#if $t.user.uid == $logged_uid
							<a href="#" class="delIco" onclick="untag_tweet(this,'$t._id','$tag');return false;" title="删除"	style="display: none;">&nbsp;</a>
							#end if
						</li>
					 #end for 
				    </ul>
				    <div class="clear"></div>
				</div>
			 #else
			 <div class="tTagListBox ui-helper-hidden">
				 <ul class="ulTagList" id="include_tag_ul_$t['_id']"></ul>
				 <div class="clear"></div>
			 </div>	
	         #end if
        </div>
        #if $t.has_key('retweet') and $t.retweet 
        <div class="tMsgBox02">
        	<div class="msg001">
             	<a href="#">$t.retweet.user.name</a>:&nbsp;
                <span>$t.retweet.text</span>
                #if $t.retweet.has_key('tags')
                <div class="tTagListBox">
					<ul class="ulTagList">
					#for tag in $t.retweet.tags
						<li onmouseover="tagItemOnMouseOver(this)" onmouseout="tagItemsOnMouseOut(this)" >
							<a href="/tagline/$tag" class="ui-corner-all">$tag</a>
						</li> 
					#end for 
				    </ul>
				    <div class="clear"></div>
				</div>
	            #end if
       		</div>
            <div class="tToolBar01 gray01">$datetime.fromtimestamp($t.retweet.time).strftime('%m月%d日 %H:%M')</div>
        </div>
        #end if
                                       
        <div class="tToolBar01 gray01">
            <div class="fl"><span>$datetime.fromtimestamp($t.time).strftime('%m月%d日 %H:%M')</span></div>
            <div class="fr">
           		<span style="display:inline">
                	<a href="#" onclick="" name="fav" class="tScBtn01" title="收藏"></a> | 
                   	<a href="#" onclick="comment_link_click('$t['_id']');return false;">点评($t['cmt_count'])</a> | 
                    <a href="#" onclick="fw_link_click('$t['_id']');return false;">转发($t['re_count'])</a> |
                    #if $t.user.uid == $logged_uid
                    <a href="#" onclick="add_tag_link_click('$t['_id']');return false;">增加标签</a> |
                    <a href="#" onclick="del_link_click(this,'$t['_id']');return false;">删除</a>
                   	#end if
               </span> 
        	</div>
        </div> <!-- end tToolBar01-->
        
        <div class="tMsgBox03 ui-helper-hidden" id="add_tag_box_$t['_id']">
			<div class="tMsgBox03Titlebar01">
				<div class="fl"><div class="tf"></div><div style="padding-top: 3px;">输入标签:</div></div>
				<div class="fr"><a class="closeBtn02" href="#" title="关闭" onclick="close_add_tag_box('$t['_id']');return false;"></a></div>
				<div class="clear"></div>
			</div>
			<div>
				<textarea id="tag-text-$t['_id']" style="height: 24px;"></textarea>	
			</div>
			<div class="tMsgBox03Footbar001">
				<input type="button" class="submit04 mt02 fr" value="提交" onclick="add_tag('$t['_id']')"/>
				<div class="clear"></div>
			</div>
		</div><!-- end tMsgBox03-->
                                        
       	<div class="tMsgBox03 ui-helper-hidden" id="fw_box_$t['_id']">
			<div class="tMsgBox03Titlebar01">
				<div class="fl"><div class="tf"></div><div style="padding-top: 3px;">再说两句:</div></div>
				<div class="fr"><a class="closeBtn02" href="#" title="关闭" onclick="close_fw_box('$t['_id']');return false;"></a></div>
				<div class="clear"></div>
			</div>
			<div>
			#if $t.has_key('retweet') and $t.retweet 
				<textarea id="f-text-$t['_id']" style="height: 48px;"> //@$t.user.name:$t.text</textarea>
			#else
				<textarea id="f-text-$t['_id']" style="height: 48px;"></textarea>
			#end if 					
			</div>
			<div class="tMsgBox03Footbar001">
				<input type="button" class="submit04 mt02 fr" value="转发" onclick="forward('$t['_id']')"/>
				<span class="countTxt mlr01"><font>还能输入</font><em>140</em>字</span>
				<div class="clear"></div>
			</div>
		</div><!-- end tMsgBox03-->
							   
		<div class="tMsgBox03 ui-helper-hidden" id="comment_box_$t['_id']">
			<div class="tMsgBox03Titlebar01">
				<div class="fl"><div class="tf"></div><div style="padding-top: 3px;">再说两句:</div></div>
				<div class="fr"><a class="closeBtn02" href="#" title="关闭" onclick="close_comment_box('$t['_id']');return false;"></a></div>
				<div class="clear"></div>
			</div>
			<div><textarea id="c-text-$t['_id']" style="height: 48px;"></textarea></div>
			<div class="tMsgBox03Footbar001">
				<input type="button" class="submit04 mt02 fr" value="点评" onclick="comment('$t['_id']')"/>
				<span class="countTxt mlr01"><font>还能输入</font><em>140</em>字</span>
			</div>
			<div class="tCommentList ui-helper-hidden" id="comment_list_box_$t['_id']">
				<ul id="comment_list__ul_$t['_id']"> </ul>
				<div class="pt02" id="comment_cnt_box_$t['_id']">
					<div class="fl"><a href="#" target="_blank">查看全部<span id="comment_cnt_span_$t['_id']">0</span>次点评&gt;&gt;</a></div>
					<div class="fr"></div>
					<div class="clear"></div>
				</div>
			</div>
		</div><!-- end  tMsgBox03-->								   
	</div><!-- end  fright-->
	<div class="clear"></div>
</li>
#end for
